AssignPrivateIpAddresses
Description
call AssignPrivateIpAddresses to assign one or more secondary private IP addresses to an elastic network card. You can specify an idle private IP address at the switch (VSwitch) to which you belong for the network card, or automatically assign a private IP address by specifying the number of private network addresses.
Request Method
POST
Request Path
/apsara/route/Ecs/AssignPrivateIpAddresses
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
SecondaryPrivateIpAddressCount | BODY | integer | No | 1 | specify the number of private IP addresses and automatically assign IP addresses from the idle IP addresses of the switch. |
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
PrivateIpAddress.N | BODY | repeatlist | No | 10.1.2.1 | select one or more secondary private IP addresses from the idle IP addresses of the switch to which the elastic network card belongs. Value range of n: ENI is available (Available) state: 1~10. The ENI is in the bound (InUse) state: limited by instance specifications. when assigning a secondary private IP address, you cannot specify parameters PrivateIpAddress.N and parameters SecondaryPrivateIpAddressCount. |
RegionId | BODY | string | Yes | cn-qingdao-env17-d01 | the region to which the elastic network card belongs. You can call the DescribeRegions to view the latest Alibaba Cloud region list. |
NetworkInterfaceId | BODY | string | Yes | eni-bp67acfmxazb4p**** | ENI ID. |
version | BODY | string | No | 2016-01-01 | version of api |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}